/**
 * @flow
 */

// 字面量
const a: "foo" = "foo" //a只能是"foo"

const type: "success" | "error" | "warning" //联合类型，也叫作或类型


type StringOrNumber: string | number
const b: StringOrNumber = 100

//------------------

// maybe类型，变量除了当前类型，还可以是undefined,null
const gender: ?number = undefined
const gender: ?number = null